// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 移除登录日志 DELETE /api/monitor/logininfor/${param0} */
export async function loginInfoRemoveUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.loginInfoRemoveUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { infoIds: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/logininfor/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 清空登陆日志 DELETE /api/monitor/logininfor/clean */
export async function loginInfoCleanUsingDELETE(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/monitor/logininfor/clean', {
    method: 'DELETE',
    ...(options || {}),
  });
}

/** 导出登录日志 POST /api/monitor/logininfor/export */
export async function loginInfoExportUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.loginInfoExportUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<any>('/api/monitor/logininfor/export', {
    method: 'POST',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 查询系统访问记录列表 GET /api/monitor/logininfor/list */
export async function loginInfoListUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.loginInfoListUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.TableDataInfo>('/api/monitor/logininfor/list', {
    method: 'GET',
    params: {
      ...params,
      params: undefined,
      ...params['params'],
    },
    ...(options || {}),
  });
}

/** 账户解锁 GET /api/monitor/logininfor/unlock/${param0} */
export async function loginInfoUnlockUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.loginInfoUnlockUsingGETParams,
  options?: { [key: string]: any },
) {
  const { userName: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/logininfor/unlock/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
